package dem1;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-04-02
 * Time: 10:14
 */
public class MyArrayList <T>{
    private Object[] object;
    private int pos;

    public MyArrayList() {
        this.object = new Object[10];
        this.pos = 0;
    }

    public T[] getObject() {
        return (T[]) object;
    }

    public void setObject(Object[] object) {
        this.object = object;
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        this.pos = pos;
    }

    public boolean add(T t){
        object[pos] = t;
        return true;
    }

    public T get(int pos){
        return (T)object[pos];
    }


}
